package com.longxi.tianjintianbao.ui.activity.oa;

import android.content.Intent;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.longxi.tianjintianbao.R;
import com.longxi.tianjintianbao.ui.base.BaseActivity;
import com.longxi.tianjintianbao.ui.presenter.oa.ChangeFormalAtPresenter;
import com.longxi.tianjintianbao.ui.view.oa.IChangeFormalAtView;

import butterknife.BindView;

public class ChangeFormalActivity extends BaseActivity<IChangeFormalAtView, ChangeFormalAtPresenter> implements IChangeFormalAtView {
    @BindView(R.id.etPost)
    EditText mEtPost;//转正人员的岗位
    @BindView(R.id.etEducation)
    EditText mEtEducation;//转正人员的学历
    @BindView(R.id.tvEntryDate)
    TextView mTvEntryDate;//请选择入职日期

    @BindView(R.id.tvTrialStartDate)
    TextView mTvTrialStartDate;//请选择试用开始日期
    @BindView(R.id.tvTrialEndDate)
    TextView mTvTrialEndDate;//请选择试用结束日期

    @BindView(R.id.etTotal)
    EditText mEtTotal;//试用期共计月数天数
    @BindView(R.id.tvChangeType)
    TextView mTvChangeType;//请选择转正类型
    @BindView(R.id.etChangeReason)
    EditText mEtChangeReason;//请输入转正原因
    @BindView(R.id.etChangEexplain)
    EditText mEtChangEexplain;//请输入转正说明
    @BindView(R.id.tvAuditingName)
    TextView mTvAuditingName;
    @BindView(R.id.tvPersonnelName)
    TextView mTvPersonnelName;

    @BindView(R.id.btnLogin)
    Button mBtnLogin;

    @Override
    protected int provideContentViewId() {
        return R.layout.activity_change_formal;
    }

    @Override
    public void initData() {
        super.initData();
        mPresenter.setBar();
    }

    @Override
    public void initListener() {
        super.initListener();
        mBtnLogin.setOnClickListener(v -> mPresenter.saveChangeFormal());
        mTvEntryDate.setOnClickListener(v -> mPresenter.getCurrentDateTime(getTvEntryDate(), false));
        mTvTrialStartDate.setOnClickListener(v -> mPresenter.getCurrentDateTime(getTvTrialStartDate(), false));
        mTvTrialEndDate.setOnClickListener(v -> mPresenter.getCurrentDateTime(getTvTrialEndDate(), false));
        mTvChangeType.setOnClickListener(v -> mPresenter.showChangeType());
        mTvAuditingName.setOnClickListener(v -> mPresenter.showAuditing());
        mTvPersonnelName.setOnClickListener(v -> mPresenter.showPersonnel());
    }

    @Override
    protected ChangeFormalAtPresenter createPresenter() {
        return new ChangeFormalAtPresenter(this);
    }

    @Override
    public EditText getEtPost() {
        return mEtPost;
    }

    @Override
    public EditText getEtEducation() {
        return mEtEducation;
    }

    @Override
    public TextView getTvEntryDate() {
        return mTvEntryDate;
    }

    @Override
    public TextView getTvTrialStartDate() {
        return mTvTrialStartDate;
    }

    @Override
    public TextView getTvTrialEndDate() {
        return mTvTrialEndDate;
    }

    @Override
    public EditText getEtTotal() {
        return mEtTotal;
    }

    @Override
    public TextView getTvChangeType() {
        return mTvChangeType;
    }

    @Override
    public EditText getEtChangeReason() {
        return mEtChangeReason;
    }

    @Override
    public EditText getEtChangEexplain() {
        return mEtChangEexplain;
    }


    @Override
    public TextView getTvAuditingName() {
        return mTvAuditingName;
    }

    @Override
    public TextView getTvPersonnelName() {
        return mTvPersonnelName;
    }

    @Override
    public Button getBtnLogin() {
        return mBtnLogin;
    }


    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }

}


